Carlos Garnacho [Thu, 22 Dec 2022 19:02:28 +0000 (20:02 +0100)]
shell: Move tray implementation away from GtkSocket
Reimplement tray icon support on top of NaXembed. NaTrayIcon now
becomes a subclass of this type, replacing GtkSocket. The
ShellTrayIcon wrapper now embeds directly a NaTrayIcon, the
ShellEmbeddedWindow GTK widget and ShellGtkEmbed ClutterClone
objects are no longer necessary to wrap a NaXembed socket window.
Carlos Garnacho [Wed, 22 Feb 2023 10:45:26 +0000 (11:45 +0100)]
screenshot: Use GLib.BookmarkFile to save recent screenshots
Avoid the GTK dependency, and use the common GLib API to store
screenshots in recent files. While at it, give it a better
exec hint than the implicit "gnome-shell %u" GTK added for us,
nobody seems to pay attention to that, but if they ever did
it's better to provide sensible information.
Florian Müllner [Mon, 13 Feb 2023 17:09:28 +0000 (18:09 +0100)]
Clean up .gitignore
Meson enforces a separate build dir, so we no longer have to care
about build artifects in the source tree. Same applies for all
the generated crap autotools like to spread around.
Andy Holmes [Sat, 25 Feb 2023 20:24:46 +0000 (12:24 -0800)]
quickSettings: Add a getter for the deprecated label property
Since the `label` property was deprecated there have already been
reports of fatal errors for some extensions, so add a deprecated
getter with a warning to ease migration.
Florian Müllner [Thu, 23 Feb 2023 18:03:38 +0000 (19:03 +0100)]
status/bluetooth: Ignore devices when turned off
gnome-bluetooth clears the list of devices when the adapter goes
away, but we cannot assume that that'll happen when powered down.
We don't want to show a (potentially outdated) list of devices
that cannot be interacted with in that case, so explicitly check
for the active state when returning devices.
Jonas Dreßler [Sat, 9 Apr 2022 22:44:01 +0000 (00:44 +0200)]
appDisplay: Remove pan gesture from FolderView
The FolderView is a subclass of BaseAppView, which already has a
full-blown SwipeTracker attached to it. So no need to add another
PanGesture on top, the SwipeTracker will handle it for us.
Florian Müllner [Thu, 23 Feb 2023 19:36:52 +0000 (20:36 +0100)]
shell/app: Also make recent when raising other windows
Mutter no longer picks the next focus window based on the stacking
order, but on the active workspace's MRU list. So to keep the old
activating behavior, raising other windows is no longer enough.
Use the newly added raise_and_make_recent() method to also move the
window to the front of the MRU list.
DaPigGuy [Wed, 22 Feb 2023 17:57:18 +0000 (09:57 -0800)]
status/system: Fix missing battery percentage in the top bar
The percentage label text was bound to the 'label' property, which was
renamed to 'title' in GNOME 44 with the quick settings changes. This
was missed.
Sebastian Keller [Tue, 14 Feb 2023 20:29:43 +0000 (21:29 +0100)]
status/network: Fix WirelessNetwork related leaks
NetworkManager frequently refreshes the list of available access points.
For some reason this often ends up removing some or all access points
only to add them back in a later refresh later. With the exception of
the currently connected access point, which is never removed.
When all access points of a WirelessNetwork have been removed, it gets
destroyed by NMWirelessDeviceItem::_removeAccessPoint(). This however
does not happen for the currently connected network due to the always
present access point. If this network now happens to consist of multiple
access points, the "unused" NMAccessPoints will get removed and added
in these refreshes, without the WirelessNetwork getting destroyed.
Whenever such an unused access point is added, due to the use of signal
tracking this leaks the NMAccessPoint and SignalTracker until the
WirelessNetwork is destroyed.
However when the NMWirelessDeviceItem is destroyed, for example due to
suspending, it stops tracking access point changes, ensuring that the
condition for the WirelessNetwork being destroyed can not occur anymore.
Even with just two access points, such as can be found in 2.4GHz+5GHz
home routers this issue leaks hundreds of NMAccessPoints and
SignalTrackers per day. As well as a small number of WirelessNetworks
which are also kept alive by the SignalTrackers.
To fix this disconnect from the access point when it gets removed and
destroy all remaining networks when the NMWirelessDeviceItem is
destroyed.
Florian Müllner [Mon, 13 Feb 2023 22:48:39 +0000 (23:48 +0100)]
status/volume: Unmute to default volume when at 0
The stream can be muted by clicking the icon, or by dragging the
slider to 0. In the latter case, clicking the icon to unmute the
stream will not do anything (at least apparently).
Settings addresses this in its Sound panel by using a default
volume of 25% in that case, so do the same in the Shell.
Andy Holmes [Sun, 12 Feb 2023 21:46:07 +0000 (13:46 -0800)]
environment: Define promisify of g_query_info_async in the global scope
This is something that will be used in other places outside the
background code, so let's just define it globally without having to care
about the importing order.
Co-authored-by: Marco Trevisan (Treviño) <mail@3v1n0.net>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2638>
dateMenu: Use desktop action to open Evolution calendar
We include a private hidden .desktop file for evolution's calendar
component, so that we can explicitly open that component when
evolution is configured as the default calendar application.
That's because the evolution developers didn't want to ship
additional .desktop files at the time, but they have since
then included a desktop action that can be used for the same
purpose.
Sebastian Keller [Sun, 12 Feb 2023 17:20:15 +0000 (18:20 +0100)]
gdmUtil: Fix SignalTracker leak in ShellUserVerifier
ShellUserVerifier was connecting to UserVerifierChoiceList signals using
SignalTracker, but never disconnected those, leading to the
corresponding SignalTracker being leaked.
AuthPrompt creates two entries, one for text and one for passwords, but
only ever one is used as child widget. This would lead to the other one
not getting destroyed when the the AuthPrompt is destroyed.
This now manually destroys the inactive one when the AuthPrompt is
destroyed to avoid that leak.
Sebastian Keller [Tue, 20 Dec 2022 12:49:59 +0000 (13:49 +0100)]
overview: Skip SHOWN to SHOWN when changing from app grid to overview
Switching between the app grid and the window picker in the overview via
gestures results in _gestureEnd() getting called with endProgress !== 0
in both cases, which leads to it calling _showDone(). This then
unconditionally changes the state to SHOWN, which in this situation is
already the current state. Since the previous commit this results in a
warning, so check if we are already in the SHOWN state.
Sebastian Keller [Wed, 16 Mar 2022 21:36:49 +0000 (22:36 +0100)]
overview: Validate transitions of the `shown` state
There have been several bugs in the past that caused invalid transitions
of the `shown` state, such as going from `showing` to `showing`. These
cause consecutive emissions of the `showing` signal, which can confuse
other classes such as the search controller which connects to the stage
`key-press-event` on showing and disconnects again on `hiding`. Having
two consecutive `showing` signals will cause it to connect twice, and
only disconnect once when hiding the overview again. This will lead to
key presses getting repeated in the search until the session is
restarted. Because there is no obvious connection to how and when this
issue got triggered, this now adds some validation code that only allows
valid transitions and throws an error otherwise so we get a backtrace of
the code actually causing the problem.
This does not fix the issue(s) causing the invalid state transitions, it
only adds a way of tracking them down.
Sandboxed apps that run without a window are detected by the new
background monitoring service, introduced by xdg-desktop-portal.
We have an opportunity to improve the predictability of the desktop
and ensure that application state in transparently reported to users
by showing these apps, and allowing them to closed.
Add a new background apps menu to the quick settings, that is always
added at the bottom of the popover, and has a slightly custom, flat
style applied to it.
Show background-running apps in this menu, and allow closing them
by first attempting to execute the 'quit' action through D-Bus, and
if that fails, sending SIGKILL to the process.
See https://gitlab.gnome.org/Teams/Design/os-mockups/-/issues/191
Florian Müllner [Mon, 8 Aug 2022 10:08:26 +0000 (12:08 +0200)]
status/bluetooth: Add device menu
The new quick toggle gives us a good place for exposing connected
and connectable devices. This was part of the original mockups,
but didn't make the cut for GNOME 43 due to time constraints.
Florian Müllner [Wed, 8 Feb 2023 00:34:47 +0000 (01:34 +0100)]
status/volume: Mute/unmute when clicking icon
This behavior was lost with the move to quick settings. Now that
we allow slider icons to be interactive, we can easily restore
the feature (and even in a less-Easter-eggy way)
Florian Müllner [Wed, 8 Feb 2023 00:32:52 +0000 (01:32 +0100)]
quickSettings: Allow interactive slider icons
Before the move to quick settings, it was possible to mute the volume
by clicking to the left of the slider. In order to re-enable that
feature, allow slider icons to be interactive.
Carlos Garnacho [Fri, 10 Feb 2023 14:07:50 +0000 (15:07 +0100)]
window-tracker: Only emit ::tracked-windows-changed on title changes
Since commit a1d650ce27, window title changes are listened for in the
ShellWindowTracker in order to emit ::tracked-windows-changed when
there are window title changes.
The rest of the things that happen in between (removing the window
from a ShellApp, possibly have it destroyed, and possibly creating a
new ShellApp to re-insert the window) are superfluous and even result
in the altTab switcher popup ending up confused about the applications
available.
Only emit the signal so changes can be followed on D-Bus, but avoid
the ShellApp fiddling otherwise.
Fixes: a1d650ce27 - window-tracker: Emit 'tracked-windows-changed' on title changes Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6385
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2634>
Florian Müllner [Wed, 18 Jan 2023 16:46:35 +0000 (17:46 +0100)]
quickSettings: Add small border to menu toggles
The slightly lighter background of the menu button turned out
to not be quite enough to indicate that it's a separate control
from the main toggle. Address this with a small border between
the two elements.
Florian Müllner [Mon, 22 Aug 2022 23:29:10 +0000 (01:29 +0200)]
quickSettings: Split menu toggle
Menu toggles are currently regular toggles with an additional
arrow button. This allows for a simpler implementation, but
has downsides with regards to keyboard navigation and hover
feedback.
To make it more obvious that the two parts of the menu toggle
perform different actions, change the overall structure of the
toggle to *contain* a regular toggle and the menu button.
That way each element uses its own hover effect, and shows up
in the keynav focus chain.
Florian Müllner [Fri, 7 Oct 2022 12:21:08 +0000 (14:21 +0200)]
status/volume: Use same icon for slider/top bar
Currently the icon in the top bar indicates the volume level, while
the icon next to the slider indicates the type of output (speaker
or headphone). The speaker- and volume icons are quite similar,
but different enough to feel inconsistent, so use the volume one
in both cases.
Florian Müllner [Fri, 2 Dec 2022 19:52:44 +0000 (20:52 +0100)]
layout: Add work-around for testing greeter UI in nested
Testing the greeter UI in nested has been broken for a long time
now, because the backend isn't ready yet when we try to push a
modal (via the screen shield).
As running nested is only relevant for development and testing,
working around the issue rather than fixing it properly seems
fine, so do just that and slightly delay startup when testing
the greeter UI.
Jonas Dreßler [Wed, 8 Feb 2023 15:42:18 +0000 (16:42 +0100)]
Add ClutterFrame arguments to after-paint signal handlers
The ClutterFrame argument was added to several signals with mutter commit 08b0e563d4d0088e19d24f3199626a2d27349d09. We have a bunch of after-paint
handlers in gnome-shell too, and updating those was apparently forgotten,
introducing subtle memory corruption that was luckily easy to track down by
running gnome-shell with ASAN enabled. Let's fix that and add the additional
argument to all the signal handlers.